import request from '@/utils/request'

// 获取一类专题下的试卷
export function toGetList(query) {
  return request({
    url: '/column/toGetList',
    method: 'get',
    params: query
  })
}

export function toDelete(id) {
  return request({
    url: '/column/toDelete/' + id,
    method: 'get'
  })
}

export function toGetColumnInfo(id) {
  return request({
    url: '/column/toGetColumnInfo/' + id,
    method: 'get'
  })
}

export function toHandle(data) {
  return request({
    url: '/column/toHandle',
    method: 'get',
    params: data
  })
}

export function togetCourseList(query) {
  return request({
    url: '/column/toGetCourseList',
    method: 'get',
    params: query
  })
}

export function toOpenFree(data) {
  return request({
    url: '/column/toOpenFree',
    method: 'post',
    params: data
  })
}

export function toGetCourseList(data) {
  return request({
    url: '/column/getNoInColumn',
    method: 'post',
    params: data
  })
}

export function toSaveCourses(data) {
  return request({
    url: '/column/toSaveCourses',
    method: 'post',
    params: data
  })
}

export function toSaveColumn(data) {
  return request({
    url: '/column/toSaveColumn',
    method: 'post',
    data
  })
}

export function toGetGiveList(query) {
  return request({
    url: '/column/toGetGiveList',
    method: 'get',
    params: query
  })
}

export function toDelOrder(id) {
  return request({
    url: '/column/toDelOrder/' + id,
    method: 'get'
  })
}

export function getMemberList(query) {
  return request({
    url: '/column/getMemberList',
    method: 'get',
    params: query
  })
}

export function toGiveColumn(data) {
  return request({
    url: '/column/toGiveColumn',
    method: 'post',
    params: data
  })
}

export function toGiveColumns(data) {
  return request({
    url: '/column/toGiveColumns',
    method: 'post',
    params: data
  })
}

export function toCancelRel(data) {
  return request({
    url: '/column/toCancelRel',
    method: 'post',
    params: data
  })
}

export function toSaveSort(data) {
  return request({
    url: '/column/toSaveSort',
    method: 'post',
    params: data
  })
}

export function toEditSort(data) {
  return request({
    url: `/column/saveColumnSort`,
    method: 'post',
    data
  })
}

export function columnAdd(data) {
  return request({
    url: `/column/columnAdd`,
    method: 'post',
    data
  })
}

export function classGet(query) {
  return request({
    url: '/column/classGet',
    method: 'get',
    params: query
  })
}

export function classDel(query) {
  return request({
    url: '/column/classDel',
    method: 'get',
    params: query
  })
}

export function classAdd(data) {
  return request({
    url: `/column/classAdd`,
    method: 'post',
    data
  })
}
